Email

Parameters

The Email notification service sends email notifications using SMTP protocol and requires specifying the following settings:

  • host - the SMTP server host name
  • port - the SMTP server port
  • username - username
  • password - password
  • from - from email address
  • html - optional bool, true or false
  • insecure_skip_verify - optional bool, true or false

Example

The following snippet contains sample Gmail service configuration:

  1. apiVersion: v1
  2. kind: ConfigMap
  3. metadata:
  4. name: <config-map-name>
  5. data:
  6. service.email.gmail: |
  7. username: $email-username
  8. password: $email-password
  9. host: smtp.gmail.com
  10. port: 465
  11. from: $email-username

Without authentication:

  1. apiVersion: v1
  2. kind: ConfigMap
  3. metadata:
  4. name: <config-map-name>
  5. data:
  6. service.email.example: |
  7. host: smtp.example.com
  8. port: 587
  9. from: $email-username

Template

Notification templates support specifying subject for email notifications:

  1. apiVersion: v1
  2. kind: ConfigMap
  3. metadata:
  4. name: <config-map-name>
  5. data:
  6. template.app-sync-succeeded: |
  7. email:
  8. subject: Application {{.app.metadata.name}} has been successfully synced.
  9. message: |
  10. {{if eq .serviceType "slack"}}:white_check_mark:{{end}} Application {{.app.metadata.name}} has been successfully synced at {{.app.status.operationState.finishedAt}}.
  11. Sync operation details are available at: {{.context.argocdUrl}}/applications/{{.app.metadata.name}}?operation=true .